function query_resignationManager(page) {
	sys_loading();
	var parm = $('#queryForm').serialize() + (page != null ? ('&page=' + page) : '');
	var url = create_url('resignationManager-query');
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_loading_close();
			$('#page_content').html(result);
		}
	});
}



function detail_resignationManager(code) {
	var parm = {'code':code};
	var url = create_url('resignationManager-detail');
	$.ajax({type:'POST', url:url,data:parm,
		success: function(result){
			sys_loading_close();
			$("#page_content").html(result);
		}
	});
}


//点击查看完以后,修改确认状态
function updateDesignate1_resignationManager(code) {
	var parm = {'code':code};
	var url = create_url('resignationManager-updateDesignate1');
	$.ajax({type:'POST',url:url, data:parm,
		success:function (result) {
			sys_submiting_close();
			if (result == 'success') {
				alert("审核成功");
				sys_load_handle('resignationManager');
			} else if (result == 'exists') {
				alert("对不起！你已经审核过了！");
			} else if (result == 'error') {
				alert('对不起! 你没有权限');
			} else if (result == 'parameter_error') {
				alert('对不起! 上级还未审核');
			} else {
				alert('操作失败!');
			}
		}
	});
}

function check_resignationManager() {
	var remark = $('#remark').val();
	if (remark == null || remark == ''){
		$('#remark').css('border-color','red');
	}
}

//点击查看完以后,修改确认状态
function updateDesignate2_resignationManager(code) {
	var remark = $('#remark').val();
	if (remark == null || remark == ''){
		sys_msg('亲，要说明驳回原因的哦！');
		return false;
	}
	var parm =  {'code':code, 'remark': remark};
	var url = create_url('resignationManager-updateDesignate2');
	$.ajax({type:'POST',url:url, data:parm,
		success:function (result) {
				sys_submiting_close();
			if (result == 'success') {
				alert("审核成功");
				sys_load_handle('resignationManager');
			} else if (result == 'exists') {
				alert("对不起！你已经审核过了！");
			} else if (result == 'error') {
				alert('对不起! 你没有权限');
			} else if (result == 'parameter_error') {
				alert('对不起! 上级还未审核');
			} else {
				alert('操作失败!');
			}
		}
	});
}



function delete_resignationManager(btn, i) {
	btn.parents('.rep').remove();
}